package cn.lwj.webService.control;

import cn.lwj.webService.client.WsClient;
import cn.lwj.webService.entity.JsonResult;
import cn.lwj.webService.service.DemoService;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/demo")
public class DemoControl extends BaseControl {
    @Resource
    private DemoService demoService;

    @Resource
    private WsClient wsClient;

    @ResponseBody
    @RequestMapping("/getFymc")
    public JsonResult getFymc(String fydm) {
        String ajbs = getRequestValue("ajbs");
        return demoService.getFymc(fydm);
    }

    @ResponseBody
    @RequestMapping("/testWs")
    public JsonResult testWs() throws Exception {

        JsonResult jsonResult = wsClient.test();
        //JsonResult jsonResult = new JsonResult();
        System.out.println("-------------------");
        System.out.println("-------------------");
        return jsonResult;
    }


}
